<template>
  <div class="container">
    <div style="">
      <div class="card_nd_title">
        <span>既往病史</span>
        <div class="line" style="width:64px;"></div>
      </div>

      <div class="content_box">
        <div
          class="card_content"
          v-if="report.hypoglycemiaIsExistText !== null && report.hypoglycemiaIsExistText !== '——'"
        >
          <div class="item">
            <span style="font-size: 16px;color: #000;">低血糖发生史</span>
            <div style="float:right"><a-badge color="red" /><span style="font-size:12px">已确诊</span></div>
          </div>
          <div>
            <a-row>
              <a-col class="item" :span="24">频率： {{ report.hypoglycemiaFrequency }}</a-col>
              <a-col class="item" :span="24">原因： {{ report.hypoglycemiaCause }}</a-col>
              <a-col class="item" :span="24">症状： {{ report.hypoglycemiaSymptom }}</a-col>
            </a-row>
          </div>
        </div>
        <div class="card_content" v-if="report.dnhsText !== null && report.dnhsText !== '——'">
          <div class="item">
            <span style="font-size: 16px;color: #000;">糖尿病高渗综合征发生史</span>
            <div style="float:right"><a-badge color="red" /><span style="font-size:12px">已确诊</span></div>
          </div>
          <div>
            <a-row>
              <a-col class="item" :span="24">频率： {{ report.dnhsFrequency }}</a-col>
            </a-row>
          </div>
        </div>
        <div class="card_content" v-if="report.ketoacidosisText !== null && report.ketoacidosisText !== '——'">
          <div class="item">
            <span style="font-size: 16px;color: #000;">糖尿病酮症酸中毒发生史</span>
            <div style="float:right"><a-badge color="red" /><span style="font-size:12px">已确诊</span></div>
          </div>
          <div>
            <a-row>
              <a-col class="item" :span="24">原因： {{ report.ketoacidosisCause }}</a-col>
              <a-col class="item" :span="24">程度： {{ report.ketoacidosisDegreeText }}</a-col>
              <a-col class="item" :span="24">发生频率： {{ report.ketoacidosisFrequency }}</a-col>
              <a-col class="item" :span="24">尿酮体检查： {{ report.ketoacidosisUrineKetoneText }}</a-col>
              <a-col class="item" :span="24">血胴体检查： {{ report.ketoacidosisBloodKetone }}</a-col>
            </a-row>
          </div>
        </div>
        <div class="card_content" v-if="report.lacticAcidosisText !== null && report.lacticAcidosisText !== '——'">
          <div class="item">
            <span style="font-size: 16px;color: #000;">糖尿病乳酸酸中毒发生史</span>
            <div style="float:right"><a-badge color="red" /><span style="font-size:12px">已确诊</span></div>
          </div>
          <div>
            <a-row>
              <a-col class="item" :span="24">频率： {{ report.lacticAcidosisFrequency }}</a-col>
            </a-row>
          </div>
        </div>
        <div class="card_content" v-if="report.kidneyText !== null && report.kidneyText !== '——'">
          <div class="item">
            <span style="font-size: 16px;color: #000;">其他原因导致肾脏疾病</span>
            <div style="float:right"><a-badge color="red" /><span style="font-size:12px">已确诊</span></div>
          </div>
          <div>
            <a-row>
              <a-col class="item" :span="24">所患肾脏疾病： {{ report.kidneyDisease }}</a-col>
              <a-col class="item" :span="24">所患肾脏疾病确诊日期： {{ report.kidneyDiseaseDate }}</a-col>
              <a-col class="item" :span="24" v-for="item in report.kidneyData.split(';')" :key="item">{{ item }}</a-col>
            </a-row>
          </div>
        </div>
        <div class="card_content" v-if="report.otherDiseaseOther !== null && report.otherDiseaseOther !== '——'">
          <div class="item">
            <span style="font-size: 16px;color: #000;">其他病史</span>
            <!-- <div style="float:right"><a-badge color="red" /><span style="font-size:12px">已确诊</span></div> -->
          </div>
          <div>
            <a-row>
              <a-col class="item" :span="24" v-for="item in report.otherDiseaseOther.split('、')" :key="item">{{
                item
              }}</a-col>
            </a-row>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'Anamnesis',
  props: ['report'],
  data() {
    return {}
  },
  methods: {}
}
</script>

<style lang="less" scoped>
// /deep/ .ant-descriptions-item-label {
//   width: 25% !important;
// }
// /deep/ .ant-descriptions-item-content {
//   width: 75% !important;
// }
@media print {
  .container {
    page-break-inside: avoid;
  }
}
.container {
  padding: 50px 24px 0 24px;
}

.card_nd_title {
  margin-bottom: 30px;
  span {
    font-size: 16px;
    // padding-left: 10px;
    font-weight: bold;
    color: #000;
  }
}
.line {
  height: 6px;
  border-radius: 6px;
  // margin-left: 10px;
  background-color: #00b5d4;
  opacity: 0.3;
}
.content_box {
  column-count: 2;
  // display: flex;
  // flex-wrap: wrap;
  // justify-content: space-between;
}
// .left_box {
//   width: 45%;
//   display: flex;
//   flex-direction: column;
// }
// .right_box {
//   width: 45%;
//   display: flex;
//   flex-direction: column;
// }
.card_content {
  break-inside: avoid;
  // display: inline-block;
  margin-bottom: 30px;
  padding: 20px;
  border: 1px solid #ccc;
}
.item {
  margin-bottom: 20px;
}
</style>

